import os
import re


# with os.popen('tasklist', 'r') as f:
#     for eachline in f:
        # print(re.split(r'\s+|\t', eachline.rstrip()))


with os.popen('tasklist /nh', 'r') as f:
    for eachline in f:
        print(re.findall(r'([\w.]+(?: [\w.]+)*)\s\s+(\d+) \w+\s\s+\d+\s\s+([\d,]+ K)', eachline.rstrip()))